package com.boang.entity.dto;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "storage")
@Data
public class StorageDO {
    private Aliyun aliyun;
    private Tencent tencent;
    private Qiniu qiniu;
    // 默认激活配置
    private String active = "aliyun";

    @Data
    public static class Aliyun {
        private String endpoint;
        private String accessKey;
        private String secretKey;
        private String bucket;
        private String region;
    }

    @Data
    public static class Tencent {
        private String region;
        private String secretId;
        private String secretKey;
        private String bucket;
    }

    @Data
    public static class Qiniu {
        private String accessKey;
        private String secretKey;
        private String bucket;
        private String domain;
    }
}